package controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HelloWorldController {
    @RequestMapping("hello")
    public ModelAndView hello() {
        System.out.println("hello springmvc...");
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","hello springmvc...");
        modelAndView.setViewName("WEB-INF/jsp/hello.jsp");
        return modelAndView;

    }
}
